package biz.ezcom.design.pattern.mediator;

/**
 * 具体的中介者，联合国安理会 
 */
public class MediatorUnitedNationsSecurity extends MediatorUnitedNations {
	private CountryUSA usa;
	private ContryIraq iraq;
	
	public CountryUSA getUsa() {
		return usa;
	}

	public void setUsa(CountryUSA usa) {
		this.usa = usa;
	}

	public ContryIraq getIraq() {
		return iraq;
	}

	public void setIraq(ContryIraq iraq) {
		this.iraq = iraq;
	}

	@Override
	public void send(String message, Country country) {
		if(country == usa){
			iraq.receive(message);
		}else if(country == iraq){
			usa.receive(message);
		}
	}

}
